<template>        
    <div class="emoji-card" @click="chooseEmoji(props.emojiSrc)">
        <el-image style="width: 25px; height: 25px" :src="props.emojiSrc"/>
    </div>
</template>

<script setup>
import {ref,reactive, onMounted} from 'vue'
const props = defineProps({
    emojiSrc:String
})

const emit = defineEmits(["chooseEmoji","closeDialog"])

const chooseEmoji = (src)=>{
    console.log("选中的emoji地址是:",src);
    // 需要给父组件传递两个值, 1.选中的表情url; 2.关闭dialog的指令
    emit("chooseEmoji",src)
    emit("closeDialog",src)
}
</script>

<style scoped lang="scss">

.emoji-card {
    margin-top: 5px;
    margin-left: 5px;
}

</style>